"use strict";

const Ws    = require("ws");
const Utils = require("./utils");

let ws = new Ws("ws://127.0.0.1:1234/");
ws.on("open", () => {
  ws.SendPacket(1, {
    "radian": 1.414,
    "rotation": 125,
    "x": 0.5, "y": 0.5
  });
});
ws.on("message", (data, flags) => {
  console.log("client receive [ %j ]", Utils.decode(data));
});
